export interface Response<T> {
  result: number;
  message: string;
  data: T;
};

export interface MetaInfo {
  id: number;
  icon: string;
  hidden: number;
  parent: number;
};

export interface SecurityTicketVo {
  token: string;
};

export interface SecurityPrincipalVo {
  username: string;
  password: string;
  domain?: string;
  address?: string;
  remark?: string;
};

export interface CustomUserLoginInfo {
  userId?: number;
  userType?: number;
  loginAccount: string;
  mobilePhone?: string;
  email: string;
  loginStatus?: number;
  loginIp?: number;
  password: string;
  userGender?: string;
  pInvitationCode?: string;
  confirmedPassword: string;
  createTime?: Date;
  modifiedTime?: Date;
};

export interface SecurityUserVo extends SecurityTicketVo {
  userId: number;
  groupId: number;
  realname: string;
  sex: string;
  username: string;
  mobilephone: string;
  address: string;
  updateAmount: number;
  remark: string;
  updateProxy: number;

};

export interface SecurityAuthorityVo {
  meta: MetaInfo;
  menuId: number;
  menuName: string;
  menuIcon: string;
  parentMenuId: number;
  menuHidden: string;
  menuPath: string;
  menuPage: string;
  orderNo: number;
  remark: string;
};


export interface SysUserMenu {
  menuId: number;
  id: number;
  groupId: number;
  parentId: number;
  name: string;
  route: string;
  remark: string;
  icon: string;
  notinmenu: number;
  parent: number;
  sysGroup: number;
};

export interface SysUserGroup {
  groupId?: number;
  groupName: string;
  isValid: number;
  remark: string;
  sysGroup: number;
};

export interface UserPowerVo extends UserInfo {
  group: SysUserGroup;
};

export interface AddUserVo {
  groupId: number;//角色
  userInfo: UserInfo;
  loginInfo: UserLoginInfo;
}

export interface SetUpVo {
  groupId: number;
  menuList: Array<number>;
}

export interface VerificationCodeVo {
  targetAddr: string; // 手机号或者是email
  code?: string; // 验证码
  userType: number
};

export interface AuthorityInfoVo {
  userVo: SecurityUserVo;
  tree: Array<SecurityAuthorityVo>;
  authority: Array<SysUserMenu>;
};

export interface User {
  token: string;
  userId: number;
};

export interface RequestPageVo {
  offset?: number;
  limit?: number;
};

export interface PageVo<T> {
  offset: number;
  limit: number;
  totalCount: number;
  dataList: Array<T>;
};

export interface TaskInfo {
  taskId?: number; //  
  taskNumber: number; // 任务编号
  platform: number; // 测评平台
  siteId: number; // 测评站点的id
  shopId?: number; // 店家id
  shopName: string; // 店铺名称
  category: number; // 产品类别
  titleEnglish: string; // 英文标题
  titleChinese: string; // 中文标题
  productAsin: string; // 产品ASIN
  price: number; // 产品的价格
  interlinkage: string; // 产品的链接
  keyword: string; // 关键字
  position: string; // 位置
  amount: number; // 数量
  addedFee: number; // 增值费
  exchange: number; // 汇率
  taskType: number; // 任务类别
  publishStatus?: number; // 发布状态
  taskStatus: number; // 任务状态
  createUserId: number; // user id
  productImg: string; // 图片
  createTime?: Date; // 创建时间
  modifiedTime?: Date; // 最后修改时间
};

export interface TaskOrder {
  orderId: number;
  taskId: number; // 发布任务表的主键id
  orderNumber: string; // 订单编号
  orderStatus: number; // 订单状态
  buyerUserId: number; // 买家信息id
  status: string; // 状态
  createTime: Date; // 创建时间
  modifiedTime: Date; // 最后修改时间
  amount: number; // 金额
  currency: string; // 
  exchangeRate: number; // 汇率
  orderImg: string; // 订单图片
};

export interface UserInfo {
  userId?: number;
  nickName: string; // 用户名字
  userGender?: string; // 用户性别
  mobilePhone?: string; // 手机号
  userQq?: string; // 用户qq
  userIdentityCard?: string; // 用户身份证
  userGrade?: number; // 用户等级
  userBankCard?: string; // 银行卡号
  balance?: number; // 余额
  userType: number; // 类型
  status?: number; // 状态
  userLevel?: number; // 会员等级
  userSite?: string; // 用户地址
  createTime?: Date; // 注册时间
};

export interface UserLoginInfo {
  userId?: number;
  userType: number;
  loginAccount: string;
  password: string
  mobilePhone: string;
  email?: string;
  loginIp?: string;
  loginStatus?: string;
  createTime?: Date;
  modifiedTime?: Date;
};

export interface ProfitIncome {
  incomeId?: number; // 
  billNo?: string; // 交易流水号（微信、支付宝、paypal）
  userId: number; // 用户id
  incomeType: number; // 类型（奇收偶支，1充值，3完成任务，2提现，4支付任务）
  amount: number; // 金额
  currency?: string; // 币种（如CNY）
  exchangeRate?: number; // 当时汇率（转CNY汇率）
  checkUserId?: number; // 审核用户
  createTime?: Date; // 创建时间
  payType?: number;
  paymentNo?: string; // 付款账号
  incomeNo?: string; // 交易号
};

export interface CheckCommon {
  checkId: number;
  foreignKeyId: number;
  foreignType: string;
  checkStatus: number;
  checkExplains: string;
  checkUserId: number;
  checkTime: Date;
  status: boolean;
}

export interface ReqTaskOrder extends RequestPageVo {
  siteId?: number;
  status?: number;
  orderStatus?: number;
  orderNumber?: string;
  orderId?: number;
  img?: string;
  buyerUserId?: number
};

export interface RespFileVo {
  upSucceed: boolean;//是否上传成功
  path: string;//完整路径
  fileUrl: string;//文件下载url
  fileName: string;//文件名称
}


export interface ReqProfitIncome extends RequestPageVo {
  nickName?: string;
  checkNickName?: string;
  checkStatus?: string;
  checkTime?: Date;
  checkType?: number;
  beginTime?: Date;
  endTime?: Date;
  userId?: number;
  incomeType?: number;
};

export interface RespProfitIncome extends ProfitIncome {
  nickName: string;
  checkNickName: string;
  checkStatus: number;
  checkTime: Date;
  checkType: string;
}

export interface RespTaskOrder extends TaskOrder {
  taskNumber: number;
  siteName: string;
  platform: number;
  shopName: string;
  category: number;
  titleEnglish: string;
  titleChinese: string;
  productAsin: string;
  price: number;
  interlinkage: string;
  keyword: string;
  position: string;
  amount: number;
  tAmount: number;
  addedFee: number;
  exchange: number;
  countPrice: number;
  taskType: number;
  publishStatus: number;
  taskStatus: number;
  createUserId: number;
  userGrade: number;
  buyerNickName: string;
  buyerMobilePhone: string;
  buyerUserGender: string;
  commission: number;
  taskTypePrice: number;
};

export interface ReqTaskInfo extends RequestPageVo {
  publishStatus?: number;
  siteId?: number;
  createUserId?: number;
  taskNumber?: string;
};

export interface RespTaskInfo extends TaskInfo {
  nickName: string; // 卖家名称
  siteName: string; // 站点名称
  orderCount: number; // 订单数目
  orders: Array<RespTaskOrder>;
};


export interface ReqUserInfo extends RequestPageVo {
  type?: number;
  status?: number;
  nickName?: string;
  beginCreateTime?: Date;
  endCreateTime?: Date;
};

export interface RespUserInfo extends UserInfo {
  checkName: string;
  orderCount: string;
  platform: number;
  checkTime?: Date;
  levelName: string;
  invitationNumber: number;
  loginIp?: string;
  loginNumber?: number;
};

export interface BankCard {
  cardId: number;
  userId: number;
  cardNumber: string;
  cardMobilePhone: string;
  cardName: string;
  bankName: string;
  bankId: number;
};

export interface ReqBankCard extends RequestPageVo {
  userId: number;
};

